/*
 * Copyright 2006 Mark Bakker <mark.bakker AT gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package org.gwtsvg.client;

import org.gwtsvg.client.dom.ExtDOM;

/**
 *
 */
public class SVGPanel extends SVGContainerBase {
  public static final Namespace DEFAULT_NAMESPACE = new Namespace("svg",
      "http://www.w3.org/2000/svg");

  /**
   * Create a new SVG panel of the specified size using the default namespace
   * and URI. The default namespace prefix is "svg", and the URI is
   * "http://www.w3.org/2000/svg".
   *
   * @param width in pixels
   * @param height in pixels
   */
  public SVGPanel(double width, double height) {
    super(ExtDOM.createElementNS(DEFAULT_NAMESPACE, "svg"));
    setAttributeNS(getElement(), "width", width + "px");
    setAttributeNS(getElement(), "height", height + "px");
  }

  public boolean add(SVGWidget w) {
    return super.add(w);
  }

  public void clear() {
    super.clear();
  }

  public SVGWidget getWidget(int index) {
    return super.getWidget(index);
  }

  public int getWidgetCount() {
    return super.getWidgetCount();
  }

  public boolean remove(SVGWidget w) {
    return super.remove(w);
  }

}
